package com.kevin.learn.demo;

import java.math.BigDecimal;
import java.util.HashMap;

public class BigDecimalTest {

    public static void main(String[] args) {

        BigDecimal b1 = new BigDecimal("0.1");
        BigDecimal b2 = new BigDecimal("0");

        System.out.println(b1.compareTo(b2));
        System.out.println(b2.setScale(2, BigDecimal.ROUND_HALF_UP));

        HashMap<String, String> map = new HashMap<>();
        map.put("1","1");
        map.put("2","2");
        map.put("3","3");
        map.put("1","1");

        map.forEach((s, s2) -> {

            if (s.equals("1")) return;
            System.out.println(s);
        });
    }
}
